<?php

namespace app\api\model;

use think\Model;

class AdminModel extends Model
{
    // 表名
    protected $name = 'admin';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;



    public function getInfo($id)
    {
        $res = $this->where('id',$id)->field('id,nickname,avatar')->find();
        return $res;
    }


}
